import {createRouter, createWebHistory, RouteRecordRaw} from "vue-router";

let modules = import.meta.glob('./modules/*.ts', {eager: true, import: 'default'});
const routes: RouteRecordRaw[] = []
for (let entry of Object.values(modules)) {
    routes.push(entry as RouteRecordRaw)
}
export const routesInfo = routes;
const routerInfo = createRouter({
    history: createWebHistory('/'),
    routes: routes as RouteRecordRaw[],
    strict: false,
    scrollBehavior: () => ({left: 0, top: 0})
});
export default routerInfo;